<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="k" uri="/WEB-INF/k.tld"%>
<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>怀才进销存管理软件 - 销售前台</title>
		<jsp:include page="../inc.jsp"></jsp:include>
		<link href="${pageContext.request.contextPath}/web/css/style.css" rel="stylesheet" type="text/css" />
		<SCRIPT language="JavaScript" type="text/javascript" src="${pageContext.request.contextPath}/web/js/hdm.js"></SCRIPT>
		<SCRIPT>
		var calendar;
		var datagrid;
		$(function(){
		
			calendar = $('#calendar').calendar({
				fit : true,
				current : new Date(),
				border : false,
				onSelect : function(date) {
					$(this).calendar('moveTo', new Date());
				}
			});


			datagrid = $('#datagrid').datagrid({
				url : '${pageContext.request.contextPath}/hygl/memberAction!datagrid.html',
				title : '会员列表',
				iconCls : 'icon-save',
				pagination : true,
				pagePosition : 'bottom',
				pageSize : 10,
				pageList : [ 10, 20, 30, 40 ],
				fit : true,
				fitColumns : false,
				nowrap : false,
				border : false,
				idField : 'id',
				sortName : 'serial',
				sortOrder : 'desc',
				checkOnSelect : false,
				selectOnCheck : false,
				singleSelect : true,
				columns : [ [ {
					title : '编号',
					field : 'id',
					width : 40,
					align:'center',
					sortable : true,
				}, {
					title : '会员编号',
					field : 'serial',
					width : 150,
					align:'center',
					sortable : true
				},{
					title : '所属经销商ID',
					field : 'uid',
					sortable : false,
					width : 100,
					align:'center',
					hidden : true
				}, {
					title : '所属经销商',
					field : 'uname',
					sortable : false,
					width : 80,
					align:'center'
				},{
					title : '会员姓名',
					field : 'name',
					width : 80,
					align:'center'
				}, {
					title : '会员类型ID',
					field : 'tid',
					sortable : false,
					width : 100,
					align:'center',
					hidden : true
				}, {
					title : '会员类型',
					field : 'tname',
					sortable : false,
					width : 80,
					align:'center'
				},{
					title : '手机',
					field : 'mobile',
					sortable : true,
					width : 100,
					align:'center'
				}, {
					title : '开卡时间',
					field : 'openDate',
					sortable : true,
					width : 130,
					align:'center'
				},{
					title : '生日',
					field : 'birthdayA',
					sortable : true,
					width : 130,
					align:'center'
				},{
					title : '消费金额',
					field : 'consume',
					sortable : true,
					width : 80,
					align:'center'
				},{
					title : '积分',
					field : 'point',
					sortable : true,
					width : 80,
					align:'center'
				},{
					title : '&nbsp;&nbsp;&nbsp;&nbsp;备注',
					field : 'remark',
					width : 200
				},{
					title : '所属商店',
					field : 'repertoryName',
					width : 200
				}] ],
				onRowContextMenu : function(e, rowIndex, rowData) {
					e.preventDefault();
					$(this).datagrid('unselectAll');
					$(this).datagrid('selectRow', rowIndex);
					$('#menu').menu('show', {
						left : e.pageX,
						top : e.pageY
					});
				}
			});
			
			
		});


		function logout(){
			sy.messagerConfirm('请确认', '您确定要退出前台销售？', function(r) {
				if(r){
					$.ajax({
						url : '${pageContext.request.contextPath}/loginAction!logout.html',
						type : 'get',
						success:function(){
							self.location.reload();
							if(window.opener){
								opener.location = opener.location;
							}
							window.close();
						}
					});
				}
			});
		}
		function _search() {
			datagrid.datagrid('load', sy.serializeObject($('#searchForm')));
		}
		
		function cleanSearch() {
			datagrid.datagrid('load', {});
			$('#searchForm input').val('');
		}
		</SCRIPT>
	</head>

	<body>
		<div class="top">
			<div class="logo">
				<img src="${pageContext.request.contextPath}/web/imgs/htlogo.jpg" width="480" height="47" />
			</div>
			<div class="right">
				欢迎您！${sessionInfo.loginName} [${sessionInfo.roleNames}]
				<a href="javascript:void(0)" onclick="logout()">退出登录</a>
				<!-- 
					<a href="#">修改密码</a>
				 -->
			</div>
		</div>
		<div class="content">
			<div class="right">
				<!--日历标题-->
				<div class="title">
					<img src="${pageContext.request.contextPath}/web/imgs/pic1.gif" width="6" height="6" />
					日历
				</div>
				<!--/日历标题-->
				<!--日历-->
				<div style="height:180px;">
					<div id="calendar"></div>
				</div>
				<!--/日历-->
				<!--公告+提醒-->
				<div class="title">
					<ul>
						<li id="cp1" class="cpover" onMouseOver="setTab_('cp',1,5,'cpover')">
							公告<span class="tabRefresh"><a href="javascript:void(0);" onclick="javascript:document.frames('announcementIframe').location.reload()" class="icon-mini-refresh"></a></span>
						</li>
						<li id="cp2" onMouseOver="setTab_('cp',2,5,'cpover')">
							系统提醒<span class="tabRefresh"><a href="javascript:void(0);" onclick="javascript:document.frames('warnIframe').location.reload()" class="icon-mini-refresh"></a></span>
						</li>
					</ul>
				</div>
				<div class="conts">
					<div id="cp_con1">
						<iframe width="100%" height="400px;" scrolling="auto" frameborder="0" onload="javascript:void(0);" name="announcementIframe" id="announcementIframe" src="${pageContext.request.contextPath}/qtmk/announcementAction!noAuth_tabAnnounce.html"></iframe>
					</div>
					<div id="cp_con2" style="display: none;">
						<iframe width="100%" height="400px;" scrolling="no"  frameborder="0" onload="javascript:void(0);" name="warnIframe" id="warnIframe" src="${pageContext.request.contextPath}/qtmk/remindWarnAction!noAuth_tabRemindWarn.html"></iframe>
					</div>
				</div>
				<!--/公告+提醒-->
			</div>
			<div class="left">
				<div class="nav">
					<ul>
						<k:security key="XSGL_QTXS">
						<li>
							<a href="${pageContext.request.contextPath}/xsgl/sale.html">
								<img src="${pageContext.request.contextPath}/web/imgs/navxsgl.jpg" width="104" height="35" /> 
							</a>
						</li>
						</k:security>
						<k:security key="XSGL_XSTH">
						<li>
							<a href="${pageContext.request.contextPath}/xsgl/saleReturn.html">
								<img src="${pageContext.request.contextPath}/web/imgs/nav-xsth.jpg" width="104" height="35" /> 
							</a>
						</li>
						</k:security>
						<k:security key="XSGL_KCCX">
						<li>
							<a href="${pageContext.request.contextPath}/xsgl/amount.html">
								<img src="${pageContext.request.contextPath}/web/imgs/nav-kcgl.jpg" width="104" height="35" /> 
							</a>
						</li>
						</k:security>
						<k:security key="XSGL_HYGL">
						<li>
							<a href="${pageContext.request.contextPath}/xsgl/member.html">
								<img src="${pageContext.request.contextPath}/web/imgs/nav-hygl.jpg" width="104" height="35" /> 
							</a>
						</li>
						</k:security>
						<k:security key="XSGL_RJQS">
						<li>
							<a href="${pageContext.request.contextPath}/xsgl/settlement.html">
								<img src="${pageContext.request.contextPath}/web/imgs/nav-rjqs.jpg" width="104" height="35" /> 
							</a>
						</li>
						</k:security>
						<k:security key="XSGL_XSJLCX">
						<li>
							<a href="${pageContext.request.contextPath}/xsgl/salelist.html">
								<img src="../web/imgs/navxsglcx.jpg"  height="35" /> 
							</a>
						</li>
						</k:security>
						<k:security key="XSGL_THJLCX">
						<li>
							<a href="${pageContext.request.contextPath}/xsgl/saleReturnlist.html">
								<img src="../web/imgs/navthglcx.jpg" height="35" /> 
							</a>
						</li>
						</k:security>
					</ul>
				</div>
				<div class="cont">
					<div style="height: 110px; overflow: hidden;">
						<form id="searchForm">
							<table class="" style="width: 100%; height: 100%;">
								<tr align="center">
									<th>会员手机</th>
									<td><input name="mobile" style="width:200px;" /></td>
									<th>会员姓名</th>
									<td><input name="name" style="width:220px;" /></td>
									
								</tr>
								<tr align="center">
									<th>会员类型</th>
									<td><input name="tid" style="width:200px;" /></td>
									<th>消费金额</th>
									<td><input name="consumeStart"   style="width: 100px;" />
									至<input name="consumeEnd"  style="width: 100px;" />
									</td> 
								</tr> 
								<tr>
									<td colspan="4" align="center" style="padding:8px 0 4px 480px;">
										<a href="javascript:void(0);" class="button2 dis_block fl m_l"
											onclick="_search();">搜索</a><a href="javascript:void(0);"
											class="button3 dis_block fl m_l" onclick="cleanSearch();">取消</a>
									</td>
								</tr>
							</table>
						</form>
					</div>
					<div style="overflow: hidden;height:495px;">
						<table id="datagrid"></table>
					</div>
				</div>
			</div>
		</div>
		<br><br><br>
		<div class="foot">
			Copyright @ 2013
			<a style="color:#FFFFFF; text-decoration:none;" target="_blank" href="http://www.miitbeian.gov.cn">浙ICP备13002014号-1</a>
			<br>
			杭州怀才商贸有限公司 服务电话：0571-28030726
		</div>
		<div id="bg" class="bg" style="display: none;"></div>
		<iframe id='popIframe' class='popIframe' frameborder='0'></iframe>
	</body>
</html>
